package io.github.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @Author: Max
 * @Date: 2019/10/8 14:36
 */

/**
 * 通过handler无法获取类上下文的相关信息   取消 使用aop
 */
public class LogHandlerConfigure extends WebMvcConfigurerAdapter {


    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(new LogHander()).addPathPatterns("/**");
    }
}
